package com.okcl.manage.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.okcl.common.annotation.Excel;
import com.okcl.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 书籍对象 tb_book
 *
 * @author Mike
 * @date 2025-05-14
 */
@Data
public class Book extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 书籍ID
     */
    @Excel(name = "书籍ID")
    private Long id;

    /**
     * 书籍名称
     */
    @Excel(name = "书籍名称")
    private String bookName;

    /**
     * 封面图片地址
     */
    @Excel(name = "封面图片地址")
    private String cover;

    /**
     * 作者
     */
    @Excel(name = "作者")
    private String author;

    /**
     * 出版社
     */
    @Excel(name = "出版社")
    private String publisher;

    /**
     * 出版日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出版日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishDate;

    /**
     * 价格
     */
    @Excel(name = "价格")
    private BigDecimal price;

    /**
     * 数量
     */
    @Excel(name = "数量")
    private Long quantity;

    /**
     * 所属区域ID（外键）
     */
    @Excel(name = "所属区域ID", readConverterExp = "外=键")
    private Long regionId;

    /**
     * 所属类别ID（外键）
     */
    @Excel(name = "所属类别ID", readConverterExp = "外=键")
    private Long categoryId;


}
